High power-factor control circuit and method for switched mode power supply

ABSTRACT

A switch mode power supply (SMPS) system includes a rectifying circuit for coupling to an AC input voltage and a transformer having a primary winding for coupling to the rectifying circuit and a secondary winding coupled to the primary winding. The system also has a power switch coupled to the primary winding and a control circuit coupled to the power switch. The control circuit is configured to control current flow in the primary winding such that an envelop waveform formed by peak points of current pulses are in phase with the magnitude of the AC input voltage. Moreover, the SMPS system is configured to provide a constant average output current.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims benefit and priority of Chinese PatentApplication No. 201010275190.X, filed Sep. 6, 2010, commonly owned andincorporated herein by reference in its entirety for all purposes.

BACKGROUND OF THE INVENTION

The present invention relates generally to switch mode power supply(SMPS) systems. More particularly, embodiments of the invention relateto methods and circuits for controlling and improving the power factorof SMPS systems.

Switch mode power supply (SMPS) systems have many advantages overconvention linear regulated power supplies. These advantages includesmaller volume, better stability, and higher power efficiency. As aresult, SMPS has found wide spread applications, such as televisions,set-top boxes, and video recorders, portable telephone chargers,personal digital assistants (PDAs), and even certain automated toothbrushes. In recently years, as light emitting diode (LED) technologiesare becoming more mature, SMPS is widely used as drivers for LEDdevices, including in white-light bulb replacement applications.

However, conventional SMPS for LED lighting systems suffer from manylimitations. As an example, when an SMPS is used to drive an LED, itgenerally needs to provide a constant output current in order tomaintain stable brightness of the LED. When used with different AC powersources, for example, 110V vs. 220V, conventional LED lighting devicesoften need to be customized for the local power sources. Often adifferent control circuit is required, or an additional power sourceselection circuit is needed.

Moreover, unlike convention incandescent light bulbs, LEDs lightingdevices do not behave like a purely resistive load in an AC circuit.Therefore, conventional LED light bulbs often do not provide desirableefficiency in the utilization of the AC power supply. The efficiency ofan AC electric power system can be measured by “power factor”. As usedherein, the power factor of an AC electric power system is defined asthe ratio of the real power flowing to the load to the apparent power inthe circuit. Real power is the capacity of the circuit for performingwork in a particular time. Apparent power is the product of the currentand voltage of the circuit. A recent U.S. energy efficiency standardrequires an LED with greater than 5 W power rating to have a powerfactor no lower than 0.7. An European standard requires an LED with morethan 25 W to have a power factor higher than 0.94. Conventional devicesoften can not meet these standards.

Furthermore, in home or hotel lighting applications, traditionalincandescent light bulbs are often used with a silicon dimmer device toadjust the brightness. Conventional LED lighting devices often can notaccommodate a dimmer circuit, and can not provide the brightnessadjustment capability.

Therefore, more efficient and cost-effective techniques for improvingpower supply systems for LED lighting applications are highly desired.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention provide methods and circuits for anSMPS to provide a constant average output current at a high powerfactor. In some embodiments, the same SMPS controller IC can be usedover a wide range of AC input voltages, such as 110V or 220V powersupplies, without additional AC source selection circuits. Moreover, insome embodiments, the SMPS controller are also configured to provideconstant average output current and high power factor in LED lightingsystems with an adjustable dimmer circuit, in which the input AC inputpower is cut off during certain phase angles. These features can lowerproduction cost of the LED lighting system and lead to even widerapplications.

In an embodiment, the high power factor can be achieved by generating aphase reference signal that has the same phase angle as the input ACcurrent signal and controlling the envelop of peak points of the currentpulses in the power supply to be in phase with the phase referencesignal. In some embodiments, the current pulses allowed in the powerswitch are determined by the desired output drive current. Therefore,the power supply can operate with the same control circuit underdifferent AC input voltage sources, for example, 110V vs. 220 V.

According to an embodiment of the present invention, a switch mode powersupply (SMPS) system includes a rectifying circuit for coupling to an ACinput voltage and a transformer having a primary winding for coupling tothe rectifying circuit and a secondary winding coupled to the primarywinding. The system also has a power switch coupled to the primarywinding and a control circuit coupled to the power switch. The controlcircuit is configured to control current flow in the primary windingsuch that an envelop waveform formed by peak points of current pulsesare in phase with the magnitude of the AC input voltage. Moreover, theSMPS system is configured to provide a constant average output current.In an embodiment, the SMPS system is configured to provide a constantaverage output current substantially independent of the magnitude of theAC input voltage.

In an embodiment, the SMPS system is configured to provide a constantaverage output current to an LED lighting apparatus. Here, the averageoutput current is output current averaged over a time period of 10milliseconds or longer. In another embodiment, the rectifying circuit isconfigured to output a rectified voltage having a magnitude that variesin phase with the magnitude of the AC input voltage. In someembodiments, the rectifying circuit includes a rectifying capacitorcharacterized by a capacitance that allows an output voltage of therectifying circuit to retain phase information of the AC input voltage.In a specific embodiment, the rectifying circuit includes a rectifyingcapacitor having a capacitance in the range of about 10 to about 100 nF.

In some embodiments of the SMPS, the control circuit is configured togenerate a phase reference voltage having a magnitude that is in phasewith the rectified voltage, and the control circuit is also configuredto turn off current flow in the primary winding when a voltage signalassociated with the current in the primary winding reaches the phasereference voltage. In a specific embodiment, the phase reference voltageincludes a sinusoidal voltage signal characterized by a frequencymatching the frequency of the AC input voltage and a magnitudeproportional to a desired output current.

In some embodiment, the control circuit includes a phase detectioncircuit and a reference voltage generation circuit. In anotherembodiment, each of the current pulses flowing in the primary winding ischaracterized by an on-time and an off-time, and the control circuit isconfigured to maintain a constant ratio of the on-time to the off-time.In a specific embodiment, the control circuit includes a control pulsegeneration circuit that is configured to charge a capacitor through afirst current source and discharge the capacitor through a secondcurrent source. In another embodiment, the power supply system alsoincludes a dimmer circuit that turns off the AC input voltage during aportion of each AC cycle, wherein the control circuit is configured tostop energy transfer to the secondary winding in the off portion of theAC cycle.

In another embodiment, the envelop formed by the peak points of thecurrent pulses, Ipp(t), is described by the following expression:Ipp(t)=(Ns/Np)*(1+1/K)*(½)*π*Io*|sin(2πft)|

where Np is the coil turn number for the primary winding,

Ns is the coil turn number for the secondary winding,

f is the frequency of the input AC voltage,

Io is the desired average output current, and

K is the ratio of on-time to off-time for the current pulses in theprimary winding.

According to another embodiment of the present invention, a controlcircuit for a switch mode power supply (SMPS) includes a first inputterminal for coupling to a periodic input voltage, a second inputterminal for sensing a current flow in the SMPS, an output terminal forproviding a control signal to a power switch for regulating the currentflow in the SMPS. The control circuit is configured to control currentpulses in the SMPS such that an envelop formed by peak points of thecurrent pulses are in phase with the periodic input voltage. The controlcircuit is further configured to enable the SMPS to provide a constantaverage output current.

In an embodiment, the above control circuit also includes a third inputterminal for receiving a feedback signal associated with a current flowin the output portion of the SMPS. In an embodiment, the control circuitis configured to generate a phase reference voltage that is in phasewith the periodic input voltage, and the control circuit is configuredto turn off a current flow in the SMPS when a voltage signal received atthe second input terminal reaches the phase reference voltage. In anembodiment, the phase reference voltage includes a sinusoidal voltagesignal having a frequency matching the frequency and phase of theperiodic input voltage and a magnitude proportional to a desired averageoutput current of the SMPS.

In another embodiment, the control circuit includes a phase detectioncircuit and a reference voltage generation circuit. In an embodiment,the control circuit is configured to maintain a constant ratio ofon-time to off-time for the current pulses. In another embodiment, thecontrol circuit includes a control pulse generation circuit configuredto charge a capacitor through a first current source and discharge thecapacitor through a second current source.

In a specific embodiment of the control circuit, the envelop formed bythe peak points of the current pulses, Ipp(t), is described by thefollowing expression:Ipp(t)=(Ns/Np)*(1+1/K)*(½)*π*Io*|sin(2πft)|

where Np is the turn number for the primary winding,

Ns is the turn number for the secondary winding,

f is the frequency of the input AC voltage,

Io is the desired average output current, and

K is the ratio of on time to off time for the current pulses in theSMPS.

A further understanding of the nature and advantages of the presentinvention may be obtained by reference to the remaining portions of thespecification and the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified diagram illustrating a switch mode power supply(SMPS) driving a string of light emitting diodes (LED) according to anembodiment of the present invention;

FIG. 2 is a wave form diagram illustrating the waveforms of the primarycurrent and secondary current in the SMPS of FIG. 1 according to anembodiment of the present invention;

FIG. 3 is waveform diagrams illustrating the on-off time in the primarycurrent and secondary current in the SMPS of FIG. 1 according to anotherembodiment of the present invention;

FIGS. 4 and 5 are waveform diagrams illustrating the on-off time of theprimary current and secondary current in the SMPS of FIG. 1 operatingwith a dimmer device according to an embodiment of the presentinvention;

FIG. 6 is a simplified block diagram illustrating part of a power supplycontroller 600 according to an embodiment of the present invention;

FIG. 7 is a simplified schematic/block diagram illustrating part of apower supply controller according to another embodiment of the presentinvention;

FIG. 8 show exemplary waveforms illustrating the operation of the powersupply controller of FIG. 7 according to an embodiment of the presentinvention;

FIG. 9 shows simplified circuit diagrams illustrating circuit modulesthat can be used in zero crossing detection circuit of FIG. 7 accordingto an embodiment of the present invention;

FIGS. 10 and 11 are waveform diagrams illustrating various signalsassociated with the circuits depicted in FIG. 9;

FIG. 12A is a simplified block/circuit diagram illustrating an exemplaryimplementation of the leading edge blanking circuit in FIG. 7 accordingto an embodiment of the present invention;

FIG. 12B is a waveform diagram illustrating the signals in the leadingedge blanking circuit in FIG. 12A;

FIG. 13 is a waveform diagram illustrating the signals involved in thegeneration of AC reference signal according to an embodiment of thepresent invention; and

FIG. 14 is a simplified circuit diagram for generating the AC referencevoltage as depicted in FIG. 13.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a simplified diagram illustrating a switch mode power supply(SMPS) 100 driving a string of light emitting diodes (LED) 117 accordingto an embodiment of the present invention. In this example, SMPS 100includes in a flyback converter. However, other types of converterarchitecture can also be used. As shown in FIG. 1, SMPS 100 includes atransformer 102, a power supply controller 103, and a power switch 101.Transformer 102 has a primary winding 121, a secondary winding 122, andan auxiliary winding 123, in which the black dots denote terminalshaving the same polarity. Primary winding 121 receives a rectified inputVin from a rectifying circuit that includes a diode bridge 105 andrectifies an AC input voltage Vac. SMPS 100 provides an output Vout fromsecondary winding 122 through rectifying diode 115 and capacitor 116. Asshown, the output terminal Vout also provides an output current Io toLED string 117.

In an embodiment, controller 103 is a single chip SMPS controller and isconfigured to control the on-off states of power switch 101. In otherembodiments, the controller can also be implemented in a multiple-chipconfiguration. In FIG. 1, power switch 101 is shown as a power MOSFET.But in alternative embodiments, other types of power switches, such as abipolar power transistor, can also be used. The FB terminal incontroller 103 is used for receiving a feedback signal FB, also referredto as V_(FB), reflecting the operating state of output. In this example,the FB signal is taken from auxiliary winding 123 through a voltagedivider formed by resistors 108 and 109. Controller 103 also has a CSterminal for sensing the current flowing through power switch 101 andprimary winding 121. Moreover, controller 103 has a VS terminal forsensing the magnitude and phase of rectified AC signal Vin. In thisembodiment, auxiliary winding 123 also provides operating power tocontroller 103 through a VCC terminal.

In embodiments of the invention, LED light systems can be configured tooperate with a constant average current and achieve good power factor.In some embodiments, the system can operate in a wide range input ACvoltage range under a given power output rating, without having tochange parameters of the controller components or additional circuitsfor supply voltage selection.

In driving an LED lighting system, such as those used in illumination orbacklight applications, it is desirable for the power supply to providea constant current to the LED to maintain a stable brightness. Due tothe effect of persistence of vision, human eyes are usually unable todetect brightness changes in a time period shorter than one millisecond.In some embodiments of the present invention, constant brightness can bemaintained by a power supply configured to provide a substantiallyconstant average output current at a time scale of 10 milliseconds orlonger. In some embodiments, the output current does not have harmoniccomponents with a frequency higher than 100 Hz. In LED driverapplications using such power supplies, the brightness of the LEDdevices can appear to be constant, without brightness variationsdetectable to the human eye. In a time scale of less then 10milliseconds, the average output current can be vary with time. Themagnitude of the varying current is characterized by an envelop waveformthat is in phase with the rectified input AC voltage.

In applications in which the input AC supply is characterized by apartial sinusoidal waveform (for example, when part of the phase angleis cut off by an adjustable dimmer IC), the control circuit of certainembodiments stop energy transfer during the phase region in which thesinusoidal waveform is missing. Thus, the average output current isadjusted according to the ratio of the missing sinusoidal region to thecomplete sinusoidal waveform, thereby enabling the control circuit to beused with conventional adjustable silicon dimmer devices to control thebrightness of the LED. The operation of the power supply system isdescribed below in conjunction with FIGS. 2-5.

FIG. 2 is a diagram illustrating the waveforms of the primary currentand secondary current in SMPS 100 in FIG. 1 according to an embodimentof the present invention. The lower diagram shows the primary current(Ip) pulses 201, which flows only when the power switch is turned on,and an envelop 203 of the peak current of primary current Ip. The upperdiagram of FIG. 2 illustrates the waveforms for the secondary current.The instantaneous secondary current 211 flowing through rectifying diode115 is shown as Is (211). The short duration average current Io1 isshown as 213. The long duration average current 215 is shown as Io. Insome embodiments of the present invention, “short duration average”refers to current averaged over a time period shorter than 10milliseconds, and “long duration average” refers to current averagedover a time period of 10 milliseconds or long It can be seen that theshort-duration average secondary current pulses 213 is substantially inphase with the envelop of primary current pulses 203. Moreover, the longduration average secondary current 215 is substantially constant.

According to embodiments of the present invention, a method forcontrolling a switch mode power supply includes selecting a suitablesecondary current Is (211) such that the envelop waveform of the averagesecondary current approaches the shape of Io1 (213) described above. Inan embodiment, given the brightness of the LEDs, the average outputcurrent Io (215) needed to drive the LEDs can be determined. Then, ashort-duration (under 10 msec) average output current Io1 (213) can bederived based on system power factor requirement and the measured ACinput voltage phase angle. In an example, the desired waveform for Io1,the short-duration average secondary current, can be expressed as(½)*π*Io*|sin(2πft)π, where f is the frequency of the rectified ACsupply voltage, for example, 100-120 Hz based on commercial AC supply of50-60 Hz. Based on the profile of secondary current Is and parametersassociated with system components such as the transformer, the shape ofprimary current Ip can be determined as described below.

FIG. 3 illustrates the on-off times in the primary current and secondarycurrent in an SMPS according to an embodiment of the present invention.Here, the turn-on time of the power switch is based on the requiredsecondary current, and the duration of power switch conduction time isbased on the envelop of peak primary current. As shown in the upperdiagram of FIG. 3, the ratio of secondary side conduction time Tons tocutoff time Toff, Ton/Toff, is maintained at a constant K by the powersupply controller. Let the envelop waveform of peak points of secondarycurrent Ips(t) be described by equation (1),Ips(t)=(1+1/K)*(½)*π*Io*|sin(2πft)|  (1)Then, the short-duration (less than 10 msec) average of secondarycurrent can be described by equation (2),Io1=(½)*Io*π*|sin(2πft)|  (2)In long-duration time scale, the average system output current is shownas equation (3),(f)*∫₀ ^(1/f)(Io1)dt=(f)*(½)*π*Io*∫ ₀ ^(1/f)|sin(2πft)|dt=Io  (3)

In order to satisfy equation (1), the peak points of primary currentIpp(t) need to be included in the envelop waveform described by equation(4),Ipp(t)=(Ns/Np)*(1+1/K)*(½)*π*Io*|sin(2πft)|  (4)where Ns and Np are coil turn numbers of the secondary coil and theprimary coil of the transformer, respectively. Thus, according toembodiments of the invention, by controlling primary side peak currentIpp(t) as prescribed by equation (4), the power supply can be configuredto provide a constant average drive current to a load, such as a stringof LEDs with a good power factor.

Let Va(t) denote the amplitude of the rectified input AC voltage, thenthe rectified input voltage can be expressed as follows:Vin(t)=Va(t)*|sin(2πft)  (5)The on time of the primary conduction can be determined according toequation (5) and the target primary peak current Ipp(t) described above,Vin(t)=Lp*Ipp(t)/Tonp, where Lp is the inductance of the primarywinding. Since the on time of primary current is determined to providethe desired secondary output current, the magnitude of the AC sourcevoltage Vs would not affect the output of the SMPS. Therefore, the samecontroller can be used with different AC sources, for example, 110V or220V.

In systems without a dimmer device, Va in equation (5) is atime-independent constant without a dimmer. In systems with a dimmerdevice, Va(t) may be zero in certain range of phase angle. Inapplications with a dimmer, Va(t) is zero during certain phase range.The controller can turn off the switch to prevent conducting when Va(t)is zero. In embodiments of the invention, the envelop of peak primarycurrent Ipp(t) is proportional to Vin(t), regardless of the presence ofa dimmer. Without a dimmer, Vin(t) is a complete rectified sinusoidalcurve, and the envelop of Ipp(t) is also a complete rectified sinusoidalcurve. With a dimmer, Vin(t) is an incomplete rectified sinusoidalcurve, and the envelop of Ipp(t) is also an incomplete rectifiedsinusoidal curve, with the same dimmed phase angles Thus, in someembodiment, a high system power factor can be achieved andsimultaneously allow the output average current to be controlled by thedimmer.

FIGS. 4 and 5 are waveform diagrams illustrating the on-off time of theprimary current and secondary current in an SMPS operating with a dimmercircuit according to an embodiment of the present invention. As shown inFIGS. 4 and 5, Vin is the rectified input voltage, Vp is the primarycurrent, and Vs is the secondary current. Certain phase angles ofrectified sinusoidal curve Vin are cut off by a dimmer device. In FIG.4, the input AC input voltage is cut off by the dimmer in a latterportion of the AC cycle, and in FIG. 5, the input AC input voltage iscut off by the dimmer in a front portion of the AC cycle. It can be seenthat in both cases, the envelops of the primary and secondary currentpulses are in phase with the AC input voltage.

FIG. 6 is a simplified block diagram illustrating part of a power supplycontroller 600 according to an embodiment of the present invention. Insome embodiments, controller 600 can be used as controller 103 in powersupply 100 in FIG. 1. In some embodiments, controller 600 is asingle-chip controller having six terminals:

-   -   rectified input voltage sense terminal (VS);    -   secondary side feedback terminal (FB);    -   primary side current sense terminal (CS); and    -   output terminal for driving a power switch (OUT).    -   power terminal (VCC)—not shown in FIG. 6;    -   ground terminal (GND)—not shown in FIG. 6;

As shown in FIG. 6, controller 600 includes an input voltage phasedetection module 601 coupled to the VS terminal for detecting the phaseangle of the rectified input voltage Vin as shown in FIG. 1. Inputvoltage phase detection module 601 is coupled to an AC voltage referencemodule 602, which is configured for generating a reference voltagesignal that has the same phase angle as the input AC voltage to thepower supply Vac. As shown in FIG. 1, Vin is derived from rectifyingcircuit 105 and capacitor 112. To facilitate phase detection of Vin, itis desirable for Vin to retain certain time varying characteristic ofVac. Therefore, a relatively low capacitance is selected for capacitor112. In some embodiments, the capacitance of capacitor 112 can bebetween 10 nF to 100 nF. In contrast, in some conventional powersupplies, the rectifying capacitor can have a capacitance on the orderof 5 uF. Of course, depending on the embodiments, capacitor 112 can belarger than 100 nF or smaller than 10 nF.

In FIG. 6, an off-time control module 603 is coupled to AC voltagereference module 602 to receive the reference voltage, and it is alsocoupled to the CS pin to receive the primary side current sense signal.Off-time control module 603 provides a first signal 608 to a drivermodule 604. Moreover, a secondary side sensing module 605 is couple tothe FB pin to receive a feedback signal FB, which is related to theoutput condition on the secondary side. Secondary side sensing module605 is coupled to an on-time control module 606, which provides a secondsignal 609 to driver module 604. As shown in FIG. 6, driver module 604is coupled to the OUT pin to provide a control signal OUT forcontrolling the power switch. In a specific embodiment, controller 600can be implemented in a low cost package, such as an SOT23-6 package.

FIG. 7 is a simplified schematic/block diagram 700 illustrating part ofa power supply controller 700 according to another embodiment of thepresent invention. FIG. 8 shows exemplary waveform diagrams illustratingvarious signals during the operation of the power supply controller inFIG. 7. In FIG. 7, VS zero crossing detection circuit 701 is coupled toAC reference voltage circuit 702 to output a reference voltage VrefA,which is a rectified sinusoidal signal having the same phase angle asrectified input signal at terminal VS. VrefA is coupled to the positiveinput of comparator 704. A leading edge blanking circuit 703 receivesprimary side current sense signal CS and provides a modified sensesignal CS_L to the negative input of comparator 704. When CS_L reachesreference voltage VrefA, the power switch is to be turned off. At thistime, comparator 704 outputs an OFF_N signal, which provides a negativepulse to reset D trigger circuit 713. In an embodiment, VrefA is relatedto the desired envelop waveform of peak primary current pulses asdescribed in equation (4). Comparator 704 is configured to ensure thatthe peak current pulses conform to the desired envelop waveform.

In FIG. 7, secondary side on-time detection circuit 705 receivesfeedback signal Vfb at the FB pin from the secondary side and outputs asignal Tons, which reflects the on condition of the secondary siderectifier. For example, Tons is set at a high voltage level when thesecondary side current is flowing. A high voltage level of Tons turns onswitch 709 and, through inverter 706, turns off switch 708, causing acapacitor 711 to discharge through constant current source 710. On theother hand, when the secondary side rectifier is turned off, Tons is ata low voltage level, switch 709 is turned off, and switch 708 is turnedon, causing capacitor 711 to be charged through constant current source707. As shown in FIG. 7, comparator 712 is coupled to capacitor 711 toreceive capacitor voltage A and a reference voltage VrefB. When voltageA of capacitor 711 reaches reference signal VrefB, the comparator outputsignal ON becomes high and causes the output Q of D trigger circuit 713to be high, which, through driver circuit 714, produce a control signalOUT for turning on the power switch. Here, VrefB is selected such thatthe charging and discharging curve of capacitor 711 is described by atriangular waveform. Under this condition, the ratio of secondary siderectifier on-time to off-time “K” is a constant determined by currentsources 707 and 710.

FIG. 9 shows simplified circuit diagrams illustrating circuit modulesthat can be used in zero crossing detection circuit 701 of FIG. 7according to an embodiment of the present invention. In FIG. 9, maximumvoltage sensing module 910 includes a diode 901, a capacitor 902, aswitch 903, and an inverter 904. Input voltage VS is coupled tocapacitor 902 through diode 901. As VS rises, the voltage VP atcapacitor 902 is charged up and follows VS. When VS reaches its maximumand starts to fall, diode 901 disconnects VS from capacitor 902, and VPis maintained by capacitor 902. Thus, the maximum voltage of VS in acycle is recorded at capacitor 902. As also shown in circuit block 910,capacitor 902 can be discharged through switch 903 under the control ofsignal INI1 through inverter 904.

In FIG. 9, voltage crossing detection module 920 includes a comparator905, which is coupled to VS at its positive input terminal and coupledto a reference voltage VrefC at its negative input terminal. The outputsignal of comparator 905 is labeled Tracker, which changes states whenVS crosses VrefC, i.e., when VS changes from being higher than VrefC tobeing lower than VrefC, or vise versa. A delay circuit 906 and an ANDgate 907 are used to produce a pulse signal PD1 when VS rises from a lowlevel to a high level and crosses VrefC. Similarly, an inverter 908, adelay circuit 909, and an AND circuit 910 are used to produce a secondpulse signal PD2 when VS drops from a high level to a low level andcrosses VrefC.

FIGS. 10 and 11 are waveform diagrams illustrating of the time variationof the signals associated with the circuits depicted in FIG. 9. FIG. 10shows the signal waveforms when a front part of the AC input voltage iscut off by the dimmer circuit (also referred to as “front cut”), andFIG. 11 shows the waveforms when a latter part of the AC input voltageis cut off by the dimmer circuit (also referred to as “back cut”). Here,the waveform over a complete cycle of the input AC input voltage is usedto determine whether a front portion or the latter portion of the ACvoltage is cut off. As shown in FIGS. 10 and 11, signal INI1 goes fromlow to high when signal PD1 (or PD2) pulse arrives. INI2 goes from lowto high when the next PD2 (or PD1) pulse arrives after INI1 has becomehigh.

In an embodiment, VrefC in voltage crossing detection circuit 920 inFIG. 9 is selected to be close to zero, such that comparator 905 candetermine zero crossing of VS. In FIGS. 10 and 11, T1 is the time ittakes for VS to increase from VrefC to the peak VS voltage (designatedas VP), and T2 is the time it takes for VS to decrease from VP to VrefC.If T1 is greater than T2, then it can be determined that a latterportion of the AC input voltage is chopped off. Conversely, If T1 issmaller than T2, then it can be determined that a front portion of theAC input voltage is chopped off.

In FIG. 9, dimmer circuit phase detection circuit 930 includes acomparator 911, with its positive input coupled to peak voltage VPproduced by maximum voltage sensing circuit 910 and its negative inputcoupled to VS. The output of comparator 911 can be used to determine theduration in which VS rises from VrefC to VP and the duration in which VSfalls from VP to VrefC. The output of comparator 911 is coupled to anAND gate 912, which also has signal INI1 as another input. A lowcomparator output voltage and a high INI1 signal indicate VS is in theprocess of rising from VrefC to VP. At this time, switch 916 is turnedoff and switch 915 is turned on, causing capacitor 917 to be charged bycurrent source 913. Conversely, a high comparator output voltage and ahigh INI1 signal indicate VS is in the process of falling from VP toVrefC. At this time, switch 916 is turned on and switch 915 is turnedoff, causing capacitor 917 to be discharged by current source 914.

When INI2 signal is low, the positive input of comparator 920 isinitially set to VrefD. During the time when Tracker is high, comparator920 output signal can reflect the length of charging and dischargingtime, and the two time periods T1 and T2 described above. The output ofcomparator 920 is coupled to D trigger circuit 921, which is alsocoupled to INI2 at its clock terminal CLK. When the INI2 signal changesfrom low to high, the CLK terminal triggers the D trigger circuit andthe output signal of comparator 920 enters the D terminal of the Dtrigger and is locked. Assuming the dimmer circuit cuts off the latterpart of the input voltage cycle, it takes longer for VS to rise fromVrefC to peak voltage VP than to fall from VP to VrefC. Under thiscondition, the output of comparator 920 is high, and the output of Dtrigger 921 is locked at high, indicating that pulse signal PD1 shouldbe used to determine the zero-crossing of the input AC voltage.Conversely, if the dimmer circuit cuts off the early part of the inputvoltage cycle, the pulse signal PD2 should be used. The waveformdiagrams of these signals are illustrated in FIGS. 10 and 11.

FIG. 12A is a simplified block/circuit diagram illustrating an exemplaryimplementation of the leading edge blanking circuit 703 in FIG. 7according to an embodiment of the present invention. FIG. 12B is awaveform diagram illustrating various signals in FIG. 12A. FIG. 12Billustrates a spike in the CS signal, which represents the current inthe power switch. The spike occurs at the leading edge of the OUT signalpulse, when the power switch changes from an off state to an on state.Leading edge blanking circuit block 703 in FIG. 7 is configured tofilter this spike from the CS signal, with details depicted in FIG. 12A.As shown in FIG. 12A, a resistor 732 and a switch 730 are disposedbetween the CS signal and comparator 704. Switch 730 connects the CSsignal to ground under the control of a pulse signal LEB, which istriggered at the leading edge of the OUT signal and lasts for a shortduration TLEB. As shown in FIG. 12B, the spike in the CS signal isremoved before it reaches comparator 704.

FIG. 13 is a waveform diagram illustrating the various signals involvedin the generation of AC reference signal according to an embodiment ofthe present invention. In FIG. 13, Vac is the AC input voltage to thepower supply system and can be provided through, for example, a poweroutlet in a city power system. VS is the rectified AC signal, and PD andPV are pulse signals indicating the zero-crossing point and the peakpoint of Vac, respectively. RI is a signal derived from PD and PV. Here,a high level of RI indicates the time period in which the AC referencesignal rises from a minimum VL to a maximum VH. Conversely, a low levelof RI indicates the time period in which the AC reference signal risesfrom the maximum VH to the minimum VL. In FIG. 13, Clock is a pulsesignal having a fixed pulse width, but variable frequency. The Clocksignal is derived from the rectified input voltage Vin at terminal VSand is used for generating the VrefA signal, which has the same phase asVin. The Clock signal is used in controlling the charging of a capacitorfor the generation of the VrefA reference signal. When RI is high, everyClock pulse causes the capacitor to be charged higher by a fixed voltageΔV. Conversely, when RI is low, every Clock pulse causes the capacitorto be discharged lower by a fixed voltage ΔV. Thus, the frequency of theClock pulse determines the rising and falling shapes of reference signalVrefA. As a result, VrefA will follow the shape of VS and maintain thesame phase angle as VS.

FIG. 14 is a simplified circuit diagram illustrating a circuit forgenerating the AC reference voltage as described in FIG. 13. As shown,circuit 1400 includes current sources 1401 and 1403 providing equalcurrent for charging and discharging capacitor 1407. Current sources1401 and 1403 are controlled by switches 1401 and 1404, respectively,which in turn are controlled by an input signal RI and inverter 1408.When RI is high, switch 1402 is on and switch 1404 is off. Under thiscondition, every Clock pulse causes current source 1401 to chargecapacitor 1407 by a fixed amount of electric charges Q=I*Ton, and causesVrefA to rise by a voltage ΔV=Q/C, where I is the current in currentsources 1401 and 1403, Ton is the on time, or the pulse width, of theClock pulse, and C is the capacitance of capacitor 1407. Conversely,when RI is low, switch 1401 is on and switch 1402 is off. Every Clockpulse causes current source 1403 to discharge capacitor 1407 by a fixedamount of electric charges Q=I*Ton, and causes VrefA to fall by avoltage ΔV=Q/C. By controlling the frequency of the Clock pulse, VrefAcan be generated exhibit the shape of a rectified sinusoidal wave.

The above description includes specific examples used to illustratevarious embodiments. It is understood, however, that the examples andembodiments described herein are for illustrative purposes only. Variousmodifications or changes in light thereof will be suggested to personsskilled in the art and are to be included within the spirit and purviewof this invention.

What is claimed is:
 1. A switch mode power supply (SMPS) system,comprising: a rectifying circuit for coupling to an AC input voltage forproviding a rectified AC voltage having a magnitude that varies in phasewith the magnitude of the AC input voltage; a transformer having aprimary winding for coupling to the rectifying circuit and a secondarywinding coupled to the primary winding; a power switch coupled to theprimary winding; and a control circuit coupled to the power switch, thecontrol circuit being configured to provide a reference voltage that isin phase with the rectified AC voltage and has a magnitude selected toproduce a desired output, the control circuit being configured tocontrol current pulses in the primary winding such that an envelopewaveform formed by peak points of the current pulses are in phase withthe AC input voltage; wherein the reference voltage is a sinusoidalvoltage signal |VrefA|*|sin(2πft)| (V) characterized by: a frequency 2πfmatching the frequency of the AC input voltage; and a magnitude |VrefA|(V) selected to produce a desired output current; wherein the SMPSsystem is configured to provide a constant average output current,wherein the control circuit is configured to turn off current flow inthe primary winding when a voltage signal associated with the current inthe primary winding reaches the reference voltage.
 2. The power supplysystem of claim 1, wherein the SMPS system is configured to provide aconstant average output current substantially independent of a magnitudeof the peak voltage of the AC input voltage.
 3. The power supply systemof claim 1, wherein the SMPS system is configured to provide a constantaverage output current to an LED lighting apparatus, wherein the averageoutput current is output current averaged over a time period of 10milliseconds or longer.
 4. The power supply system of claim 1, whereinthe rectifying circuit comprises a rectifying capacitor characterized bya capacitance that allows an output voltage of the rectifying circuit toretain phase information of the AC input voltage.
 5. The power supplysystem of claim 1, wherein the rectifying circuit comprises a rectifyingcapacitor having a capacitance in the range of about 10 to about 100 nF.6. The power supply system of claim 1, wherein the control circuitcomprises a phase detection circuit and a reference voltage generationcircuit.
 7. The power supply system of claim 1, wherein the controlcircuit is configured to receive a feedback signal associated with acurrent flow in the secondary winding; and the control circuit isconfigured to maintain a constant ratio of Tons/Toffs, the on time andoff time of secondary current, based on the feedback signal, therebycausing the SMPS to provide a constant average output current.
 8. Thepower supply system of claim 7, wherein the control circuit isconfigured to charge a capacitor using a first current source duringToffs, and discharge the capacitor using a second current source duringTons, and the constant ratio is based on the ratio of the first currentsource to the second current source.
 9. The power supply system of claim1, wherein the envelope formed by the peak points of the current pulses,Ipp(t), is described by the following expression:Ipp(t)=(Ns/Np)*(1+1/K)*(1/2)*π*Io*|sin(2πft)|  (A) where Np is the coilturn number for the primary winding, Ns is the coil turn number for thesecondary winding, f is the frequency of the input AC voltage (Hertz),Io is the desired average output current (A), and K is the ratio ofon-time to off-time for the current pulses in the primary winding. 10.The power supply system of claim 1, further comprising a dimmer circuitthat turns off the AC input voltage during a portion of each AC cycle,wherein the control circuit comprises a dimmer phase detection circuitand is configured to stop energy transfer to the secondary winding insaid portion of the AC cycle.
 11. A control circuit for a switch modepower supply (SMPS), comprising: a first input terminal for coupling toa periodic input voltage for receiving a rectified AC voltage; a secondinput terminal for sensing a current flow in a primary winding of theSMPS; a third input terminal for receiving a feedback signal associatedwith a current flow in a secondary winding of the SMPS; an outputterminal for providing a control signal to a power switch for regulatingthe current flow in the SMPS; and a phase detection circuit and areference voltage generation circuit configured to provide a referencevoltage that is in phase with the rectified AC voltage and has amagnitude selected to produce a desired output; wherein the controlcircuit is configured to control current pulses in the primary windingof the SMPS such that an envelope formed by peak points of the currentpulses are in phase with the periodic input voltage, wherein the controlcircuit is configured to determine a time period Toffs, when thefeedback signal indicates that the current flow in the secondary windingis off, and a time period Tons, when the feedback signal indicates thatthe current flow in the secondary winding is on; wherein the controlcircuit is configured to maintain a constant ratio of Tons/Toffs, the ontime and off time of secondary current, respectively, thereby causingthe SMPS to provide a constant average output current, wherein the phasedetection circuit comprises a zero crossing detection circuit, and thereference voltage generation circuit comprises a sinusoidal voltagegeneration circuit.
 12. The control circuit of claim 11, furthercomprising a control pulse generation circuit configured to: charge acapacitor using a first current source during the time period Toffs; anddischarge the capacitor using a second current source during the timeperiod Tons; wherein and the constant ratio of Tons/Toffs is based onthe ratio of the first current source and the second current source. 13.The control circuit of claim 11, wherein the control circuit isconfigured to turn off a current flow in the SMPS when a voltage signalreceived at the second input terminal reaches the reference voltage. 14.The power supply system of claim 12, wherein the reference voltagecomprises a sinusoidal voltage signal |VrefA|*|sin(2πft)| (V)characterized by: a frequency 2πft matching the frequency of the ACinput voltage; and a magnitude |VrefA| (V) selected to produce a desiredoutput current.
 15. The control circuit of claim 11, wherein theenvelope formed by the peak points of the current pulses, Ipp(t), isdescribed by the following expression:Ipp(t)=(Ns/Np)*(1+1/K)*(1/2)*π*Io*|sin(2πft)|  (A) where Np is the coilturn number for a primary winding of the SMPS, Ns is the coil turnnumber for a secondary winding of the SMPS, f is the frequency of theperiodic input voltage (Hertz), Io is the desired average output current(A), and K is the ratio of on time to off time for the current pulses inthe SMPS.
 16. A control circuit for a switch mode power supply (SMPS),comprising: a first input terminal for coupling to a periodic inputvoltage for receiving a rectified AC voltage; a second input terminalfor sensing a current flow in the SMPS; and an output terminal forproviding a control signal to a power switch for regulating the currentflow in the SMPS; a phase detection circuit and a reference voltagegeneration circuit configured to provide a reference voltage that is inphase with the rectified AC voltage and has a magnitude selected toproduce a desired output; wherein the reference voltage generationcircuit includes: a capacitor; first and second current sources forcharging and discharging the capacitor, respectively; and a clock signalhaving a series of clock pulses derived from the rectified AC voltageand configured to control charging and discharging of the capacitor toprovide the reference voltage; wherein the control circuit is configuredto control current pulses in the SMPS such that an envelope formed bypeak points of the current pulses are in phase with the periodic inputvoltage, and the control circuit is configured to enable the SMPS toprovide a constant average output current.